package Web.controller;

import Web.domain.ResponseResult;
import Web.domain.dto.CategoryListDto;
import Web.service.CategoryService;
import Web.vo.PageVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/content/Category")
public class CategoryController {

    @Autowired
    //CategoryService是我们在huanf-framework工程的接口
    private CategoryService CategoryService;

    //查询标签列表
    @GetMapping("/list")
    //ResponseResult是我们在huanf-framework工程的实体类
    public ResponseResult<PageVo> list(CategoryListDto CategoryListDto){
        //pageCategoryList是我们在huanf-framework工程写的方法
        return CategoryService.pageCategoryList(CategoryListDto);
    }
}